@use "sass:map";

// {bem_b,bem_e,bem_m,VueAndNvueStyleAttr,when,$namespace}
@use "./mixin/mixins.scss" as *;
@use './mixin/function.scss' as *;

@import "common/index.scss";

/* #ifndef APP-NVUE */
// 非nvue下加载字体
@font-face {
  font-family: "eicon-iconfont";
  src: url("https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf")
    format("truetype");
}

/* #endif */

@include bem_b(icon) {
  /* #ifndef APP-NVUE */
  display: flex;
  /* #endif */
  align-items: center;
  @include bem_m(left) {
    flex-direction: row-reverse;
    align-items: center;
  }
  @include bem_m(right) {
    flex-direction: row;
    align-items: center;
  }
  @include bem_m(top) {
    flex-direction: column-reverse;
    justify-content: center;
  }
  @include bem_m(bottom) {
    flex-direction: column;
    justify-content: center;
  }

  @include bem_e(icon) {
    font-family: eicon-iconfont;
    position: relative;
    @include flex;
    align-items: center;

    // 批量设置按钮的css变量
    @each $type in (primary, success, warning, error, info) {
      @include bem_m($type) {
        @include VueAndNvueStyleAttr("color","color", $type);
      }
    }
  }
  @include bem_e(img) {
    /* #ifndef APP-NVUE */
    height: auto;
    will-change: transform;
    /* #endif */
  }
  @include bem_e(label) {
    /* #ifndef APP-NVUE */
    line-height: 1;
    /* #endif */
  }
}
